/*
 ============================================================================
 Page	     : 290
 Name        : day_mon3.c
 Date	     : 20210405
 Author      : Hbue 18060333
 Copyright   : Your copyright notice
 Description : uses pointer notation
 ============================================================================
 */

#include <stdio.h>
#define MONTHS 12

int main(void)
{
	int days[MONTHS] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

	for(int index = 0; index < MONTHS; index++)
	{
		printf("Month %2d has %d days.\n", index + 1, *(days + index)); 	// 与days[index]相同
	}
	return 0;
}

